import React, { Component } from 'react';
import styles from './style.scss';
import { Tooltip } from 'antd';

class Tooltips extends Component {
    render() {
        const { iconTooltip ,overlayClassName, ...others } = this.props;
        let classNames = `${styles.tooltip}`;
        overlayClassName && (classNames += ` ${overlayClassName}`);
        return (
    		<Tooltip overlayClassName={classNames} {...others} >
                {this.props.children}
                {iconTooltip && <span className={styles['icon-tooltip']}></span>}
    		</Tooltip>
        );
    }
}

export default Tooltips;